home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
signal.arc
/
SYSINT.A
< prev
next >
Wrap
Text File
|
1985-07-26
|
2KB
|
55 lines
;
; sysint -- system interrupt call
;
; Tom Poindexter, October 1983
;
; struct regval {int ax, bx, cx, dx, si, di, ds, es;} input_regs, output_regs;
;
; int int_vec;
;
; sysint(int_vec, &input_regs, &output_regs)
;
cseg
public sysint_
sysint_:
push bp ; standard
mov bp,sp ; prolog
push ds ; C data seg
mov ax,[bp+4] ; get interrupt #
mov cs:intcal+1,al ; modify int
push bp ; save for after int
mov bp,[bp+06] ; point to input_regs
mov ax,[bp+00]
mov bx,[bp+02]
mov cx,[bp+04]
mov dx,[bp+06]
mov si,[bp+08]
mov di,[bp+10]
mov ds,[bp+12]
mov es,[bp+14]
intcal:
int 255 ; call the interrupt
pop bp ; restore parameter pointer
pushf ; save flags for return
mov bp,[bp+08] ; point to output_regs
mov [bp+14],es
mov [bp+12],ds
mov [bp+10],di
mov [bp+08],si
mov [bp+06],dx
mov [bp+04],cx
mov [bp+02],bx
mov [bp+00],ax
pop ax ; flags into ax
pop ds ; recover data seg
pop bp ; standard
ret ; epilog